#include <iostream>

#include "dedup.h"
#include "illegal_argument_exception.h"
#include "run.h"


run::run(int argc, char **argv)
{
    if (argc != 2) {
        throw illegal_argument_exception(argc, argv);
    }

    std::string path = argv[1];

    dedup d(path);
    d.run();

    std::cout << "Files: " << d.get_count_files() << std::endl;
    std::cout << "Total size: " << d.get_total_size() / 1048576 << " MB" << std::endl;
    std::cout << "Dedup size: " << d.get_dedup_size() / 1048576 << " MB" << std::endl;
    std::cout << "Speed: " << d.get_processing_speed() << " MB/s" << std::endl;
}
